xen: arm: correctly handle continuations for 64-bit guests
authorIan Campbell <ian.campbell@citrix.com>
Thu, 26 Mar 2015 10:54:04 +0000 (10:54 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 30 Mar 2015 08:35:12 +0000 (09:35 +0100)
commit7466b88ec2c59b1769da358bdc843bcabbee522c
tree9c7af15b3a56cf2bafcca7858a3ba6d651fa8f7e
parentc73c58741fb76939a8e2d7b0873446a1ff061d7b
xen: arm: correctly handle continuations for 64-bit guests

The 64-bit ABI is different to 32-bit:

 - uses x16 as the op register rather than r12.
 - arguments in x0..x5 and not r0..r5. Using rN here potentially
   truncates.
 - return value goes in x0, not r0.

Hypercalls can only be made directly from kernel space, so checking
the domain's size is sufficient.

Spotted due to spurious -EFAULT when destroying a domain, due to the
hypercall's pointer argument being truncated. I'm unclear why I am
only seeing this now.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
xen/arch/arm/domain.c